-
Notifications
You must be signed in to change notification settings - Fork 629
chore: add portal context #6815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 1884fcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
@copilot add tests to ensure elements render correctly inside custom Portal when PortalContext is supplied and on the default otherwise |
@francinelucca I've opened a new pull request, #6816, to work on those changes. Once the pull request is ready, I'll request review from you. |
size-limit report 📦
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: francinelucca <[email protected]>
@copilot add a storybook story that demonstrates how to use PortalContext to render items within a different Portal than the default |
@francinelucca I've opened a new pull request, #6821, to work on those changes. Once the pull request is ready, I'll request review from you. |
…#6821) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: francinelucca <[email protected]> Co-authored-by: Marie Lucca <[email protected]>
Co-authored-by: Copilot <[email protected]>
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
@copilot fix the accessibility issue with the dark theme by using token background colors from the theme |
@francinelucca I've opened a new pull request, #6847, to work on those changes. Once the pull request is ready, I'll request review from you. |
…ckground colors (#6847) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: francinelucca <[email protected]>
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
This pull request introduces a new
PortalContext
to the@primer/react
library, allowing more flexible and context-driven control over where portal content is rendered. The changes include updates to the corePortal
component, its exports, new Storybook examples, and additional tests to ensure correct behavior when usingPortalContext
and container overrides.Changelog
New
PortalContext
toPortal.tsx
, allowing consumers to specify aportalContainerName
via React context, which determines the portal root container for content rendering. ThePortal
component now prioritizes the context value unless overridden by its owncontainerName
prop.Portal.test.tsx
to verify correct portal rendering behavior when usingPortalContext
, including context-only, default fallback, undefined context, and prop override scenarios.WithPortalContext
) inPortal.features.stories.tsx
to demonstrate how to usePortalContext
for controlling portal rendering, including context and prop override cases.Changed
index.ts
and the package entry point to includePortalContext
, making it available for consumers.Removed
Rollout strategy
Testing & Reviewing
Merge checklist